﻿using System; using HISModels.ViewModel;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using KeanuMvc.Reference;
using HIS.Utils;
using System.Reflection;
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using HISModels.Entities;
using System.Net;
using System.Configuration;

namespace HIS.Controllers.Workflow {

    public class Default : HIS.Controllers.AppBaseController {

        #region Fields
        private string strAction = string.Empty;
        private string strNotification = string.Empty;
        private HISModels.Entities.SysNavigationGroup sysNavigationGroup = null;
        private HISModels.Entities.SysNavigation sysNavigation = null;
        #endregion

        #region Workflow
        public Default() {
            Data.Add("Pagetitle", "Workflow");
            Data.Add("Notification", strNotification);
        }

        [HIS.Utils.Securities.Authorization(RoleAction = "all")]
        public override void Index() {
            try {
            } catch (Exception ex) {
                HttpContext.Current.Response.Write(ex.Message);
            }
        }

        [HIS.Utils.Securities.Authorization(RoleAction = "all")]
        public void PurchaseRequisition() {
            try {
                Data["Pagetitle"] += " :: Create Workflow Document";
            } catch (Exception ex) {
                Data["Notification"] = Helper.ErrorMessage(ex.Message);
            } finally {
                RenderFile("Workflows\\createworkflow.html");
                base.RestService.Dispose();
            }
        }

        [HIS.Utils.Securities.Authorization(RoleAction = "all")]
        public void ViewApproval() {
            try {
            } catch (Exception ex) {
                Data["Notification"] = Helper.ErrorMessage(ex.Message);
            } finally {
                RenderFile("Workflows\\actionworkflow.html");
                base.RestService.Dispose();
            }
        }

        #endregion

    }

}